﻿using System;
using System.Xml.Serialization;

namespace DataAccessLayer
{
    [Serializable, XmlType("Bullet")]
    [XmlInclude(typeof(NormalBullet))]
    [XmlInclude(typeof(TargetingBullet))]
    [XmlInclude(typeof(Missile))]
    public abstract class BulletBase : GameObject, IPowerful, IMovable, ICollidable
    {
        public int Power { get; set; }

        public int Speed { get; set; }

        public EditorRect CollisionRectangle { get; set; }

        public int EnergyPerHit { get; set; }

        protected BulletBase()
        {
            Power = 1;

            Speed = 1;

            CollisionRectangle = new EditorRect();
        }
    }
}